/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tpgentest;

import java.util.ArrayList;
import java.util.Collection;
import org.semanticweb.owlapi.apibinding.OWLManager;
import org.semanticweb.owlapi.model.IRI;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.semanticweb.owlapi.model.OWLOntologyManager;
import tpevol.Evaluator;
import tpevol.TpEvol;
import tpgen.Analyser;
import tpgen.manchester.w3org.Construct;
import tpgen.patterns.TransformationPattern;

/**
 *
 * @author shanki
 */
public class Tpgentest {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws OWLOntologyCreationException {
        OWLOntologyManager manager  = OWLManager.createOWLOntologyManager();        
        IRI iri                     = IRI.create("file:///Users/shanki/Projects/tpgen/testowl/cmt.owl");
        OWLOntology ontology        = manager.loadOntologyFromOntologyDocument(iri);

        Analyser analyser           = new Analyser();
        
        Collection<Construct> inputForbiddenConstructs  = Construct.complement(analyser.analyse(ontology));
        Collection<Construct> outputForbiddenConstructs = new ArrayList<Construct>();
        
       Evaluator eval      = new Evaluator() {

            @Override
            public double eval(String transformationPattern) {
//                if (transformationPattern.getPt().size() == 0) {
//                    return Double.MAX_VALUE;
//                } else
                {
                    return 42;
                }
            }
        };        
        
        TpEvol evol                 = new TpEvol();
        TransformationPattern tp    = evol.calculate(100, 10, 0.5, 0.5, 10, 10, 10, inputForbiddenConstructs, outputForbiddenConstructs, eval);
        
        System.out.println(tp);        
    }
}
